<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>JS_animation_封装动画函数</title>
		<style type="text/css">
			* {
				margin: 0;
				padding: 0;
			}

			body {
				background-color: darkgray;
			}

			div {
				width: 100px;
				height: 100px;
				background-color: black;
				border: 2px solid white;
				position: absolute;
				left: 0;
				top: 0;
				opacity: 1;
			}
		</style>
		<script src="index.js" type="text/javascript"></script>
		<script type="text/javascript">
			/* 
			  JS原生动画:
			  
			 		   【2】,动画函数封装:
			 		        1,getStyle
			 				2,减速
			 				3,透明度
			 				4,多属性 width left opacity;
		   */
		  window.onload = function(){
			  var oDiv = document.querySelector("div");
			  animate(oDiv,{
				  width:200,
				  left:500,
				  opacity:20
			  });
		  }
			
		</script>
	</head>
	<body>
		<div></div>
	</body>
</html>
